package com.cjyd.hrjb.exception;

import com.cjyd.hrjb.utils.ResultCode;

/**
 * Created fei wo by 2020/4/5
 */
public class ServiceException extends RuntimeException {

    private ResultCode resultCode;

    public ServiceException(ResultCode resultCode) {
        super(resultCode.getMsg());
        this.resultCode = resultCode;
    }

    public ServiceException(Throwable cause, ResultCode resultCode) {
        super(resultCode.getMsg(), cause);
        this.resultCode = resultCode;
    }

    public ResultCode getResultCode() {
        return resultCode;
    }
}
